#pragma once

#include "Containers/Containers.h"

#include "ScriptCompiler/AST/ExpressionNode.h"

class CSentenceBlockNode;

class CCaseNode : public CExpressionNode
{
public:
    CCaseNode(std::weak_ptr<CScriptFileContext> InFile)
        : CExpressionNode(InFile, EASTNodeType::Case)
    {
    }

    std::shared_ptr<CScriptToken> Case;

    //condition, default case donot have condition
    TOptional<std::shared_ptr<CExpressionNode>> Condition;

    //body
    std::shared_ptr<CSentenceBlockNode> Body;

    bool IsDefaultCase() ;

    virtual void DebugPrint(int32_t InDepth) override;

    virtual std::shared_ptr<CScriptToken> GetFirstToken() override { return Case; }


};